fix(opentelemetry-sdk-node): the custom value from env variable for service.instance.id should take priority over random uuid as backup#6345
Merged
maryliag merged 8 commits intoopen-telemetry:mainfrom Jan 28, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6345 +/- ##
==========================================
+ Coverage 95.67% 95.68% +0.01%
==========================================
Files 313 313
Lines 9667 9667
Branches 2226 2226
==========================================
+ Hits 9249 9250 +1
+ Misses 418 417 -1
🚀 New features to boost your workflow:
|
david-luna
approved these changes
Jan 28, 2026
trentm
added a commit
to trentm/opentelemetry-js
that referenced
this pull request
Jan 28, 2026
This actually results in the single-quotes being part of the value.
resource: Resource {
attributes: [
KeyValue { key: 'service.instance.id', value: AnyValue { stringValue: "'custom-name'" } },
...
Refs: open-telemetry#6345
Contributor
|
@maryliag Are you willing to do the same changes for auto-instrumentations-node? |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The service-instance.id was being set as random uuid, even when there were a custom value on env variable.
This PR fixes the correct priority, having the environment detector for last.